package com.hl.card.modular.packBack.controller;

import com.hl.card.common.persistence.model.PartnerLog;
import com.hl.card.modular.packBack.service.PartnerLogService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/partnerlog")
public class PartnerLogController {

    @Resource
    private PartnerLogService partnerLogService;

    private String PREFIX = "/packback/partnerLog/";


    @RequestMapping("")
    public String index(){
        return PREFIX+"partnerLog.html";
    }

    /**
     * 获取销售利润列表
     */
    @RequestMapping(value = "/list")
    @ResponseBody
    public Object list(Integer offset,Integer limit) {
        Map<String, Object> map = new HashMap<>();
        map.put("offset",offset);
        map.put("limit",limit);
        List<PartnerLog> list= partnerLogService.selectPartnerLog(map);
        return list;
    }
}
